p +
labs(title = "Title", x = "Weight", y = "Miles-per-gallon") +
theme_minimal()webr-demo
WebR
This document demonstrates the webR package for the #rstats community. Using it, in conjunction with the quarto-webr Quarto extension, allows users to create Quarto documents with code that runs at runtime instead of during document rendering.
We can modify this base graph (stored as the variable p), for instance by changing the background from grey to white.
Now, replace the text in the previous cell to read:
(You can click the clipboard icon at the upper-right of the cell above to copy its text) and click Run Code again.
Graph of a line
Here we’ll graph the line, y = mx + b. Adjust the values of b and m below and click Run Code.
Now, click Run Code here to graph the line.